

var app = new Vue({
	el: '#app',
	data: {
		list: [],

		current: {
			title: '',
			completed: false,
			desc: '....',
			remind_at: '2021-10-01',
		}
	},

	methods: {

		add: function () {
			// console.log('add a plan ..');

			var title = this.current.title;
			if (!title) {
				console.log('no title');
			} else {
				var todo = Object.assign({}, this.current);
				console.log(todo);
				this.list.push(todo);
			}


		},

		remove: function (id) {

			this.list.splice(id,1);

			console.log(this.list);

		},

		update: function (id) {
			

		},

	}

});





// todo  
; (function () {


})();



/*


方法使用:
Object.assign({},this.current);

*/
